package com.rem.hutool.my5Utils;

import cn.hutool.core.util.StrUtil;

/**
 * String 处理
 *
 * @author Rem
 * @date 2020-08-21
 */

public class StrUtilDemo {

    public static void main(String[] args) {
        boolean b = StrUtil.hasBlank("   ", "aa", "bb");
        boolean b1 = StrUtil.hasEmpty("   ", "aa", "bb");
        String removeSuffix = StrUtil.removeSuffix("abc.txt", ".txt");
        String removePrefix = StrUtil.removePrefix("util.myTestUtil", "util.");
        String sub = StrUtil.sub("abcdefg", 2, -2);

        System.err.println("hasBlank:" + b);  //true
        System.err.println("hasEmpty:" + b1);  //false
        System.err.println("removeSuffix:" + removeSuffix);  //abc
        System.err.println("removePrefix:" + removePrefix);  //myTestUtil
        System.err.println("sub:" + sub);  //cde
    }
}
